using System;
using System.Collections.Generic;
using System.Text;

using System.Data;
using System.Data.OleDb;
using System.Collections;
using DAO;
using DTO;

namespace BUS
{
    public class MuaSachBus
    {
        // Them
        public void Them(MuaSachDto msDto)
        {
            // Kiem tra Business Rule

            MuaSachDao msDao = new MuaSachDao();
            msDao.Them(msDto);
        }

        // Xoa
        public void Xoa(int maDauSach, int maKH)
        {
            // Kiem tra Business Rule neu co
            MuaSachDao msDao = new MuaSachDao();
            msDao.Xoa(maDauSach, maKH);
        }

        // Sua
        public void Sua(MuaSachDto msDto)
        {
            // Kiem tra Business Rule neu co
            MuaSachDao msDao = new MuaSachDao();
            msDao.Sua(msDto);
        }

        // Tim Kiem
        public MuaSachDto TimKiem(int maMuaSach)
        {
            // Kiem tra Business Rule neu co
            MuaSachDto msDto;
            MuaSachDao msDao = new MuaSachDao();
            msDto = msDao.TimKiem(maMuaSach);
            return msDto;
        }

        // Lay Bang
        public DataSet LayBang()
        {
            // Kiem tra Business Rule neu co
            DataSet ds;
            MuaSachDao msDao = new MuaSachDao();
            ds = msDao.LayBang();
            return ds;
        }

        // Cap Nhat Bang
        public void CapNhatBang(DataSet ds)
        {
            // Kiem tra Business Rule neu co
            MuaSachDao msDao = new MuaSachDao();
            msDao.CapNhatBang(ds);
        }

        // Lay Danh Sach
        public IList LayDanhSach()
        {
            // Kiem tra Business Rule neu co
            IList ds;
            MuaSachDao msDao = new MuaSachDao();
            ds = msDao.LayDanhSach();
            return ds;
        }

        public DataTable ThongKe(string strSQL)
        {
            DataTable dt;
            MuaSachDao hsDao = new MuaSachDao();
            dt = hsDao.ThongKe(strSQL);
            return dt;
        }
    }
}
